home *** CD-ROM | disk | FTP | other *** search
/ Shareware Grab Bag / Shareware Grab Bag.iso / 001 / pibt40s1.arc / CHECKIFF.MOD < prev    next >
Encoding:
Text File  |  1986-05-23  |  642 b   |  19 lines

  1. (*----------------------------------------------------------------------*)
  2. (*              Check_If_File_Exists --- Check if file exists           *)
  3. (*----------------------------------------------------------------------*)
  4.  
  5. FUNCTION Check_If_File_Exists( File_Name : AnyStr; File_Path : AnyStr ): BOOLEAN;
  6.  
  7. VAR
  8.    File_Entry: Directory_Record;
  9.  
  10. BEGIN (* Check_If_File_Exists *)
  11.  
  12.    IF ( POS( '\' , File_Name ) = 0 ) AND
  13.       ( POS( ':' , File_Name ) = 0 ) THEN
  14.       File_Name := File_Path + File_Name;
  15.  
  16.    Check_If_File_Exists := ( Dir_Find_First_File( File_Name, File_Entry ) = 0 );
  17.  
  18. END   (* Check_If_File_Exists *);
  19.